Things you might ask.
General questions.
- How can I set up my computer to run Java?
- You need to install a Java runtime. If you run Mac OS, install
Apple's MRJ 2.1.4 or
later. (If you have Mac OS 9 or later, you've already got it.) On
Windows or Unix, install Sun's
JRE.
- How can you do MP3 stuff in Java? I thought Java was
slow.
- Java is faster than you think, although it's no match for C at
number-crunching. But while encoding or decoding MP3 audio is
hard, MP3 streaming is quite easy -- it just reads the raw MP3
data from files and transmits it over TCP connections. Very little
CPU horsepower is required.
- How many listeners can connect at a time?
- That depends mostly on your network bandwidth. A consumer
grade 128kbps-upstream DSL connection can really only host one
64kbps stream. (But see the note on
bandwidth, above.) A 1mbps T-1 line can host 15 of those or
seven 128kbps streams. A 10mbps Ethernet LAN could host over 70
128kbps streams. In the real world, network congestion and the
efficiency of your net interface will reduce this. Java
performance isn't really an issue; the server spends nearly all of
its time waiting for network I/O to complete.
- How many stations can I serve?
- As many as you have RAM and disk space for, pretty much. The
RAM is needed for Java threads and I/O buffers; a few hundred
kilobytes per station. The disk space, of course, is for the
station's MP3 files.
- What's the legality of broadcasting copyrighted
music?
- Most importantly, you need to legally own the music you're
streaming (but if you're the kind who downloads pirated MP3s from
the net, you've probably already ignored this paragraph.) You also
need to pay for a license from music publishers like ASCAP
and/or BMI
to broadcast material published by their artists. Alternatively,
if you use a legit replicator site like Live365.com,
they're probably already licensed to serve your stream.
Troubleshooting.
- I set up RadioStation at work, but no one outside my
company can connect to my server, even though I gave them my
correct IP address.
- Your workplace is almost certainly behind a network firewall.
Firewalls are designed precisely to prevent outside computers from
connecting to machines on the inside -- this helps deter malicious
attacks. But it also means you can't run a public server from
within the firewall. You'll have to convince your network
administrator either to tweak the firewall configuration to allow
connections to your machine, or to let you run RadioStation
from a machine that's not behind the firewall. The bigger your
company, the slimmer your chances of success.
- I set up RadioStation at home, but no one elsewhere
can connect. We have several computers sharing a single Internet
connection.
- This is almost the same situation as above. IP-address sharing
is done using network address translation, which is much
like a packet-filtering firewall. The result is the same: no
outside computer can connect to any computer on your network
except the one that has the physical Internet connection (modem).
You'll have to run RadioStation on that computer. If even
that doesn't work, you might have a dynamic IP address, as in the
next Q&A:
- The station address that gets printed out when I start the
server isn't always the same. This makes it hard for people to
connect, because I have to keep telling them the new
address.
- Your computer must have a dynamic IP address. It might be
using PPP or DHCP. You might be able to get a static IP address
from your ISP, but it'll cost more. (If you're at work, ask your
network administrators if you can switch to a static address.) Or
you might be able to get away with just never rebooting your
computer, since usually your dynamic address only changes when you
re-connect to the net.